@extends('layout.admin')

@section('title','修改商品')

@section('content')



  <div class="box paint color_7"> 
   <div class="title"> 
    <h4> <i class="icon-book"></i><span>修改商品</span> </h4> 
   </div> 
   <div class="content"> 
    <form class="form-horizontal row-fluid" action="/good/update" method="POST" enctype="multipart/form-data"> 
     <div class="form-row control-group row-fluid"> 
      <label class="control-label span3" for="normal-field">名称</label> 
      <div class="controls span9"> 
       <input id="normal-field" class="row-fluid" type="text" name="name" value="{{$info->name}}" /> 
      </div> 
     </div> 
     <div class="form-row control-group row-fluid"> 
      <label class="control-label span3" for="hint-field">价格</label> 
      <div class="controls span9"> 
       <input id="hint-field" class="row-fluid" type="text" name="price" value="{{$info->price}}" /> 
      </div> 
     </div> 
     <div class="form-row control-group row-fluid"> 
      <label class="control-label span3" for="with-placeholder">库存</label> 
      <div class="controls span9"> 
         <input id="with-placeholder" class="row-fluid" type="text" name="kucun" value="{{$info->kucun}}" /> 
      </div> 
     </div> 
     <div class="form-row control-group row-fluid ">
              <label class="control-label span3" for="mask-int-phone">分类</label>
              <div class="controls span9">
                  <select class="small" name="cate_id" style="width:100%">
                      <option value="0">请选择</option>
                      @foreach($cates as $k=>$v)
                          <option value="{{$v->id}}" @if($v->id == $info->cate_id) selected @endif>{{$v->name}}</option>
                      @endforeach
                  </select>
              </div>
            </div>
         
     
      
      <div class="form-row control-group row-fluid"> 
      <label class="control-label span3" for="normal-field">详情</label> 
      <div class="controls span9"> 
       <input id="normal-field" class="row-fluid" type="text" name="detail" value="{{$info->detail}}" /> 
      </div> 
     </div> 

     <div class="form-row control-group row-fluid"> 
      <label class="control-label span3" for="normal-field">颜色</label> 
      <div class="controls span9">
                    <label class="checkbox ">
                      <div class="checker" id="uniform-inlineCheckbox1"><input id="inlineCheckbox1" value="红色"  name="color[]" style="opacity: 0;" type="checkbox" @if($info->color == '红色') checked @endif ></div>
                      红色</label>
                    <label class="checkbox ">
                      <div class="checker" id="uniform-inlineCheckbox1"><input id="inlineCheckbox1" value="黄色" name="color[]" style="opacity: 0;" type="checkbox" @if($info->color == '黄色') checked @endif ></div>
                      黄色</label>
                    <label class="checkbox">
                      <div class="checker" id="uniform-inlineCheckbox2"><input id="inlineCheckbox2" value="绿色" name="color[]" style="opacity: 0;" type="checkbox" @if($info->color == '绿色') checked @endif ></div>
                      绿色</label>
                  </div> 
     </div>
     

    <div class="form-row control-group row-fluid"> 
      <label class="control-label span3" for="normal-field">尺寸</label> 
      <div class="controls span9">
                    <label class="checkbox ">
                      <div class="checker" id="uniform-inlineCheckbox1"><input id="inlineCheckbox1" value="1" name="size[]" style="opacity: 0;" type="checkbox" @if($info->color == 1) checked @endif ></div>
                      S</label>
                    <label class="checkbox ">
                      <div class="checker" id="uniform-inlineCheckbox1"><input id="inlineCheckbox1" value="2" name="size[]" style="opacity: 0;" type="checkbox" @if($info->color == 2) checked @endif ></div>
                       M</label>
                    <label class="checkbox">
                      <div class="checker" id="uniform-inlineCheckbox2"><input id="inlineCheckbox2" value="3" name="size[]" style="opacity: 0;" type="checkbox" @if($info->color == 3) checked @endif ></div>
                      L</label>
                  </div> 
     </div>
    <input type="hidden" name="id" value="{{$info->id}}">
   <div style="height:20px"></div>
   {{csrf_field()}}

     <div class="form-actions row-fluid"> 
      <div class="span3 visible-desktop"></div> 
      <div class="span7 "> 
       <button type="submit" class="btn btn-primary">提交</button> 
       <button type="button" class="btn btn-secondary">重置</button> 
      </div> 
     </div> 
    </form> 
   </div> 
   <a class="btn change_color_outside"><i class="paint_bucket"></i></a>
  </div> 
 </body>
</html>


@endsection